package com.ziyueyuwen.xiniao.service;

import com.ziyueyuwen.xiniao.bean.ZyUser;
import com.ziyueyuwen.xiniao.bean.wx.TbWxUserInfo;

/**
 * @author wancheng  on 2018/12/19.
 */
public interface ThirdPartService {
    /**
     * 加载钉钉用户
     */
    void loadDingTalkUser();

    /**
     * 获取钉钉id
     *
     * @param userAccount
     * @return
     */
    String getDingTalkId(String userAccount);

    /**
     * 获取openid
     *
     * @param userAccount
     * @return
     */
    String getOpenId(String userAccount);

    /**
     * 绑定微信
     *
     * @param userAccount
     * @param wxUserId
     * @throws Exception
     */
    void bindWx(String userAccount, String wxUserId) throws Exception;

    /**
     * 解绑
     *
     * @param userAccount
     * @throws Exception
     */
    void removeWxBind(String userAccount) throws Exception;

    /**
     * 根据微信用户id解绑微信
     *
     * @param wxUserId String
     * @throws Exception Exception
     */
    void removeWxBindByWxUserId(String wxUserId) throws Exception;

    /**
     * 获取微信相关信息
     *
     * @param userAccount
     * @return
     */
    TbWxUserInfo getWxMessage(String userAccount);

    /**
     * 获取用户相关信息
     *
     * @param wxUserId
     * @return
     */
    ZyUser getUserMessage(String wxUserId);

    /**
     * 获取
     *
     * @param wxUerId
     * @return
     */
    TbWxUserInfo getWxInfoByWxUserId(String wxUerId);
}
